#ifndef _MTQ_COMMON_H_
#define _MTQ_COMMON_H_

#include <stdlib.h>

/**
 * Get envrionment variable @aName, save in @aBuf of length @iBufLen
 */
int getenv_r(char *aBuf, int iBufLen, const char *aName);

/**
 * Trim all space in front or end of @aBuf
 */
int _mtqTrimSpace(char *aBuf);

/**
 * Trim annotation ('#') in @aBuf
 */
int _mtqTrimAnnotation(char *aBuf);

/**
 * Parse IP address @aIP, to @iData1, @iData2, @iData3, @iData3
 */
int _mtqParseIPAddr(const char *aIP, int *iData1, int *iData2, int *iData3, int *iData4);

#endif
